from pydantic import BaseModel, Field
from typing import Optional


class DatabaseInitRequest(BaseModel):
    database_name: str = Field(..., description="数据库名")
    database_host: str = Field(..., description="数据库主机")
    database_port: int = Field(..., description="数据库端口")
    database_user: str = Field(..., description="用户名")
    database_password: str = Field(..., description="密码")


class DatabaseInitResponse(BaseModel):
    success: bool
    id: Optional[int] = None
    message: str


